#include <bits/stdc++.h>
using namespace std;
const int N = 1e3 + 10;
int a, b, n, m, c, maxx = INT_MIN, um, s[N][N], pre[N][N];
int main()
{
    cin >> n >> m >> c;
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= m; j++)
        {
            cin >> s[i][j];
        }
    }
    for (int i = 1; i <= n; i++)
    {
        for (int j = 1; j <= m; j++)
        {
            pre[i][j] = pre[i - 1][j] + pre[i][j - 1] - pre[i - 1][j - 1] + s[i][j];
        }
    }
    for (int i = 1; i <= n - c + 1; i++)
    {
        for (int j = 1; j <= m - c + 1; j++)
        {
            int um = pre[i + c - 1][j + c - 1] - pre[i - 1][j + c - 1] - pre[i + c - 1][j - 1] + pre[i - 1][j - 1];
            if (um > maxx)
            {
                maxx = um;
                a = i;
                b = j;
            }
        }
    }

    cout << a << " " << b << endl;
    return 0;
}